# apps/accounts/urls.py
from django.urls import path


from .views import login  # 确保这里正确导入了你的视图函数或类
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView
from .views import get_captcha, captcha_refresh

from django.urls import include, path

urlpatterns = [
    path('login/', login, name='login'),  # 定义路径并命名
    path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
    path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
    path('captcha/get/', get_captcha, name='get_captcha'),  # 自定义获取验证码的 API

    path('captcha/refresh/', captcha_refresh, name='captcha_refresh'),  # 自定义获取验证码的 API

]